package com.cucn.ingmall.product.feign.fallback;

import com.cucn.common.exception.BizCodeEnume;
import com.cucn.common.utils.R;
import com.cucn.ingmall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author KouChaoJie
 * @since: 2022/2/23 15:27
 */
@Slf4j
@Component
public class SeckillFeignServiceFallBack implements SeckillFeignService {
    /**
     * 根据skuId查询秒杀商品
     *
     * @param skuId
     */
    @Override
    public R getSkukillInfo(Long skuId) {
        log.info("熔断方法调用.....getSkukillInfo");
        return R.error(BizCodeEnume.TO_MANY_REQUEST.getCode(), BizCodeEnume.TO_MANY_REQUEST.getMsg());
    }
}
